<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'projectID',
		'studentID',
		'projectName',
		'projectEngName',
		//'active',
		array(
		'label'=>'วันที่เริ่มโครงการ',
		'value'=>DateTimeArray::convertMysqlToThaiDate($model->startDate)
	),
		array(
		'label'=>'วันปิดโครงการ',
		'value'=>($model->endDate)?DateTimeArray::convertMysqlToThaiDate($model->endDate):""
	),
		//'statusCode',
	),
)); ?>
	<br />
<?php $majorAdvisor=$model->teachers[0];?>	
<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$majorAdvisor,
	'attributes'=>array(
		array(
			'label'=>'อาจารย์ที่ปรึกษาหลัก',
			'value'=>$majorAdvisor->regTeacher->prefix->prefix_name.$majorAdvisor->regTeacher->name." ".$majorAdvisor->regTeacher->surname,
			),
	),
)); ?>
<br />
<?php 
if (isset($model->teachers[1])) {
$minorAdvisor=$model->teachers[1];
?>	
<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$minorAdvisor,
	'attributes'=>array(
		array(
			'label'=>'อาจารย์ที่ปรึกษารอง',
			'value'=>$minorAdvisor->regTeacher->prefix->prefix_name.$minorAdvisor->regTeacher->name." ".$minorAdvisor->regTeacher->surname,
			),
	),
)); ?>
<?php }?>
<br />
<?php
$this->widget('zii.widgets.jui.CJuiButton',array(
    'name'=>'editProject',
    'caption'=>'แก้ไขข้อมูล',
    'buttonType'=>'link',
    'url'=>Yii::app()->createUrl('project/update',array('id'=>$model->projectID)),
));
?>